import Vue from 'vue'
import { URL_PREFIX } from '@/api/index'

/* /theme/page
主题列表 */
export const getThemeList = (params) => Vue.http.get(URL_PREFIX + '/theme/page', { params })

/* /theme/add
新建主题
{
  "endTime": "2024-08-27T08:36:09.953Z",
  "exclude": "string",
  "hitLocation": "string",
  "includes": [
    [
      "string"
    ]
  ],
  "region": "string",
  "startTime": "2024-08-27T08:36:09.953Z",
  "summary": "string",
  "themeName": "string"
}*/

export const postThemeAdd = (data) => Vue.http.post(URL_PREFIX + '/theme/add', data)

/* /theme/hit_locations
查询可选命中位置 */
export const getThemeHit_locations = () => Vue.http.get(URL_PREFIX + '/theme/hit_locations')

/* /theme/regions
查询可选内容地域 */
export const getThemeRegions = () => Vue.http.get(URL_PREFIX + '/theme/regions')

/* /theme/states
查询可选专题状态 */
export const getThemeStates = () => Vue.http.get(URL_PREFIX + '/theme/states')

/* /theme/update/{id}
更新主题 */
export const postThemeUpdate = (id, data) => Vue.http.post(URL_PREFIX + '/theme/update/' + id, data)

/* /theme/{id}
删除指定主题 */
export const deleteTheme = (id) => Vue.http.delete(URL_PREFIX + '/theme/' + id)
